#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Import smtplib for the actual sending function
import smtplib 
import locale

##Init class##
class PEmail:
      
    def __init__(self):  
        locale.setlocale(locale.LC_NUMERIC, "")
     
   
    def sendMessage(self, msgStr):
        fromaddr = 'kitty.petsy.jackson@gmail.com'  
        toaddrs  = 'hannes.hassler@gmail.com'  
      
        # Credentials (if needed)  
        username = 'kitty.petsy.jackson@gmail.com'  
        password = 'Miaux11g8'  
      
        # The actual mail send  
        server = smtplib.SMTP('smtp.gmail.com:587')  
        server.starttls()  
        server.login(username,password)  
        server.sendmail(fromaddr, toaddrs, msgStr)  
        server.quit()
        print "message sent:",msgStr
    
    